package cn.edu.zut.cs.Model;

import org.springframework.stereotype.Component;

@Component
public class Ward {
    private String wardId;
    private String type;
    private String bed_1;
    private String bed_2;
    private String bed_3;
    private String bed_4;
    //病房病人个数
    private int sum;
    public String getWardId() {
        return wardId;
    }

    public String getBedId(int id){
        if(id==1)
            return bed_1;
        else if(id==2)
            return bed_2;
        else if(id==3)
            return bed_3;
        else
            return bed_4;
    }

    public void setBedId(int id,String pno){
        if(id==1)
            setBed_1(pno);
        else if(id==2)
            setBed_2(pno);
        else if(id==3)
            setBed_3(pno);
        else
            setBed_4(pno);
    }

    public void setWardId(String wardId) {
        this.wardId = wardId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getBed_1() {
        return bed_1;
    }

    public void setBed_1(String bed_1) {
        this.bed_1 = bed_1;
    }

    public String getBed_2() {
        return bed_2;
    }

    public void setBed_2(String bed_2) {
        this.bed_2 = bed_2;
    }

    public String getBed_3() {
        return bed_3;
    }

    public void setBed_3(String bed_3) {
        this.bed_3 = bed_3;
    }

    public String getBed_4() {
        return bed_4;
    }

    public void setBed_4(String bed_4) {
        this.bed_4 = bed_4;
    }

    public int getSum() {
        return sum;
    }

    public void setSum(int sum) {
        this.sum = sum;
    }

    @Override
    public String toString() {
        return "Ward{" +
                "wardId='" + wardId + '\'' +
                ", type='" + type + '\'' +
                ", bed_1='" + bed_1 + '\'' +
                ", bed_2='" + bed_2 + '\'' +
                ", bed_3='" + bed_3 + '\'' +
                ", bed_4='" + bed_4 + '\'' +
                ", sum=" + sum +
                '}';
    }
}
